<%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<jsp:useBean id="db" class="connBean.ConnDB" scope="page">
</jsp:useBean>
<%@ include file="Logined.jsp" %>
<link href="images/skin.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}
-->

</style>
<body>
<table width="100%"  height="97%"border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" height="35" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">添加子类别</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td height="149" valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" height="100%" bgcolor="#F7F8F9">
    




<form method="post" action="savesecondtype.jsp">

<table height=300 >
<tr>
<td>子类别名</td><td><input type="text" name="secondtypename" /></td>
</tr>
 <tr><td> 隶属主类别</td><td><select name="t_id" >
	<%
				String sql = "select * from main_type";
				db.OpenConn();
                db.createStmt(); 
				System.out.print(sql);
				ResultSet rs = db.Query(sql);//执行SQL语句
				while (rs.next()) {
				int t_id=rs.getInt("t_id");
				String  t_name=rs.getString(2);
			%>
      <option value="<%=t_id%>"><%=t_name %></option>
<%} 
db.closeConn();
db.closeStmt();
%>
</select></td></tr>
<tr>
<td colspan="2"><input type="submit"  value="保存" /></td>
</tr>



</table>
</form>


    























</td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
</body>
